using System;

namespace NobleTech.Products.CreatureKingdom.Utils
{
    class EmptyRectangleD : IRectangleD
    {
        public bool IsEmpty
        {
            get { return true; }
        }

        public PointD LeftTop
        {
            get { throw new InvalidOperationException("Empty rectangles do not have a location"); }
            set { throw new InvalidOperationException("Empty rectangles do not have a location"); }
        }

        public SizeD Size
        {
            get { return new SizeD(0, 0); }
            set { throw new InvalidOperationException("Empty rectangles do not have a location"); }
        }

        public PointD RightBottom
        {
            get { throw new InvalidOperationException("Empty rectangles do not have a location"); }
            set { throw new InvalidOperationException("Empty rectangles do not have a location"); }
        }

        public PointD Centre
        {
            get { throw new InvalidOperationException("Empty rectangles do not have a location"); }
            set { throw new InvalidOperationException("Empty rectangles do not have a location"); }
        }

        public PointD MiddleTop
        {
            get { throw new InvalidOperationException("Empty rectangles do not have a location"); }
            set { throw new InvalidOperationException("Empty rectangles do not have a location"); }
        }

        public PointD LeftMiddle
        {
            get { throw new InvalidOperationException("Empty rectangles do not have a location"); }
            set { throw new InvalidOperationException("Empty rectangles do not have a location"); }
        }

        public bool Contains(PointD pt)
        {
            return false;
        }

        public bool Contains(IRectangleD rect)
        {
            return false;
        }

        public IRectangleD Extend(double left, double top, double right, double bottom)
        {
            throw new InvalidOperationException("Empty rectangles do not have a location");
        }

        public IRectangleD Extend(double leftRight, double topBottom)
        {
            throw new InvalidOperationException("Empty rectangles do not have a location");
        }

        public IRectangleD Extend(double size)
        {
            throw new InvalidOperationException("Empty rectangles do not have a location");
        }

        public IRectangleD Extend(SizeD size)
        {
            throw new InvalidOperationException("Empty rectangles do not have a location");
        }

        public IRectangleD Extend(SizeD leftTop, SizeD rightBottom)
        {
            throw new InvalidOperationException("Empty rectangles do not have a location");
        }

        public IRectangleD ExtendAround(PointD pt)
        {
            return new RectangleD(pt, new SizeD(0, 0));
        }

        public override string ToString()
        {
            return "Empty Rectangle";
        }
    }
}
